package com.skyeyemonitoring.entity;

import java.io.Serializable;


public class CustomDate implements Serializable {


    private static final long serialVersionUID = 1L;
    public int year;
    public int month;
    public int day;

    public CustomDate(int year, int month, int day) {
        if (month > 12) {
            month = 1;
            year++;
        } else if (month < 1) {
            month = 12;
            year--;
        }
        this.year = year;
        this.month = month;
        this.day = day;
    }


    @Override
    public String toString() {
        return year + "-" + month + "-" + day;
    }


}  